home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / clang / mcomm600.zip / DESQV.ASM < prev    next >
Assembly Source File  |  1994-10-03  |  3KB  |  84 lines

  1.  
  2. title DESQVIEW INTERFACE FOR VIDEO & TIME SLICING
  3. page 75,132
  4.  
  5. ;extracted from DVTECH.NOT provided by Quarterdeck
  6. ;modified for use with MCOMM Async Lib
  7.  
  8. comment |==================================================================
  9.  
  10. Functions used to test for presence of DesqView, get DVs video seg
  11. address, and release time to DV.  Does not reset v_seg variable in MCOMM
  12. video code.  You must do that on return from 'TestDesqView' if you want the
  13. MCOMM video code to be DesqView aware.  You will also need to set v_snow
  14. to 0 if DesqView is detected and v_seg != DV_VideoSeg.  Must call
  15. 'TestDesqView' before other functions will work.
  16. ==========================================================================|
  17. IFDEF ??version                 ;if TASM
  18.         MASM51
  19.         QUIRKS
  20. ENDIF
  21.  
  22. IFNDEF  model
  23.         .MODEL  small, c
  24. ELSE
  25.   %     .MODEL model, c
  26. ENDIF
  27.  
  28.         .CODE
  29.  
  30. DVPresent       DB      0
  31.  
  32. ;*/////////////////////////////////////////////////////////
  33. ;/  TestDesqView - tests if running under DesqView       //
  34. ;/   returns: DV version number if under DV, else 0      //
  35. ;/////////////////////////////////////////////////////// */
  36. TestDesqView PROC
  37.         mov     ax,2b01h        ; set date & check DV version
  38.         mov     cx,'DE'         ; set CX DX to DESQ
  39.         mov     dx,'SQ'         ; for the date (invalid)
  40.         int     21h             ; call DOS
  41.         cmp     al,0ffh         ; check for invalid
  42.         mov     ax,0
  43.         jz      @F              ; DESQview is not running
  44.         mov     cs:DVPresent,1  ; set 'DesqView present' flag
  45.         mov     ax,bx
  46.  @@:    ret                     ; return version number
  47. TestDesqView ENDP
  48.  
  49. ;*/////////////////////////////////////////////////////////
  50. ;/  DV_VideoSeg - gets DesqView alternate video buffer   //
  51. ;/   address                                             //
  52. ;/////////////////////////////////////////////////////// */
  53. DV_VideoSeg PROC USES di, VidBufAdr
  54.         mov     ax,VidBufAdr
  55.         cmp     cs:DVPresent,0
  56.         je      @F              ;exit if DV not running
  57.         mov     es,ax
  58.         sub     di,di           ;ES:DI = actual hardware video buffer
  59.         mov     ah,0feh
  60.         int     10h             ;get DesqView's video buffer
  61.         mov     ax,es
  62.  @@:    ret                     ;back to caller
  63. DV_VideoSeg ENDP
  64.  
  65. ;*/////////////////////////////////////////////////////////
  66. ;/  DV_TimeSlice - releases time to DesqView application //
  67. ;/    Must call 'TestDesqView' first.  Does nothing if   //
  68. ;/    DesqView was not detected.                         //
  69. ;/////////////////////////////////////////////////////// */
  70. DV_TimeSlice PROC
  71.         cmp     cs:DVPresent,0
  72.         je      @F              ; exit if DesqView not detected
  73.         mov     ax,101ah
  74.         int     15h             ; switch to DV stack
  75.         mov     ax,1000h        ; DV Pause API function call
  76.         int     15h
  77.         mov     ax,1025h
  78.         int     15h             ;switch back to user stack
  79.  @@:    ret                     ;back to caller
  80. DV_TimeSlice ENDP
  81.  
  82.         END
  83.  
  84.